#ifndef OPT_VECTOR
#define OPT_VECTOR

class opt_vector
{
private:
	union
	{
		long long digit;
		long long* digits;
	};
	int length_;
	int capacity_;

public:
	opt_vector();
	~opt_vector();
	opt_vector(long long);
	opt_vector(int length, long long fill);
	
	bool empty() const;
	int size() const;
	int capacity() const;
	int begin();
	long long back();
	int end();
	void reverse();
	void resize(const int&);
	void insert(const int& first, const int& length, const long long fill);
	void copy(const long long* source, const int& iter_first, const int& length);
	void push_back(long long number);
	long long pop_back();

	opt_vector& operator = (const opt_vector&);
	long long operator [](int) const; 
	long long& operator [](int); 
};

#endif